package com.kbook.log;

import java.util.List;

import org.apache.log4j.Logger;

public class LogWriter {

	private static final LogWriter logWriter = new LogWriter();
	private static final String VALUES_SEP_LEFT = "[";
	private static final String VALUES_SEP_RIGHT = "]";

	public static LogWriter getInstance(){
		return logWriter;
	}
	private LogWriter(){}

	public void createLog(List<String> params, Logger logger) {

		StringBuffer sb = new StringBuffer();
		for (String param : params) {
			sb.append(VALUES_SEP_LEFT + (param==null?"":param) + VALUES_SEP_RIGHT);
		}
		logger.info(sb.toString());
	}
}
